# 递归函数
def di_gui(n):
    if n == 0:
        return 0
    return n+di_gui(n-1)

print(di_gui(100))

def sum_in_range(a,b):
    c = 0
    for i in range(a,b+1):
        c += i
    return c
print(sum_in_range(1,100))